package io.renren.modules.app.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.app.entity.OrdersEntity;
import io.renren.modules.app.entity.vo.QueryOrderParam;
import io.renren.modules.app.entity.vo.QueryWithdrawalsParam;
import io.renren.modules.app.entity.vo.SelectOrderData;
import io.renren.modules.app.entity.vo.SelectWithdrawalsData;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 订单表
 *
 * @date 2022-04-20 22:37:44
 */
public interface OrdersService extends IService<OrdersEntity> {

    /**
     * 分页获取订单
     *
     * @param order 订单信息类
     * @return
     */
    public SelectOrderData queryPage(QueryOrderParam order);

    /**
     * 统计待返金额
     *
     * @param userId 用户id
     * @return
     */
    public BigDecimal statisticsAmountToBeRefunded(Long userId);

    /**
     * 新增订单
     *
     * @param order 订单信息类
     * @return
     */
    public Integer addOrder(OrdersEntity order);

    /**
     * 统计今日完成订单数
     *
     * @param userId 用户id
     * @return
     */
    public Integer getTodayFinishOrder(Long userId);

    /**
     * 分页获取订单记录
     */
    public SelectOrderData queryOrderList(QueryOrderParam order);

    /**
     * 获取订单详情
     *
     * @param ordersEntity 订单信息类
     * @return 订单详情
     */
    public OrdersEntity queryOrderDetails(OrdersEntity ordersEntity);

    /**
     * 修改订单信息
     *
     * @param orders 订单信息类
     * @return
     */
    public Integer editOrderId(OrdersEntity orders);

}

